package com.cragon.entity;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @Description: TODO
 * @Author: ZHOUHAILONG
 * @Date: 2021年03月24日 9:35
 */
@Component
public class Z implements ApplicationContextAware {
	@Autowired
	X x;

	public Z() {
		System.out.println("Z create");
	}

	@PostConstruct
	public void zInit() {
		System.out.println("Call z lifecycle init callback");
	}

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		System.out.println("Call aware callback");
	}
}
